#pragma once

#include <atlcomcli.h>
#include <stdlib.h>
#include <queue>
namespace ScannerImp
{
    using namespace std;
    class CScannerDev
    {
    public:
        CScannerDev()
        {
          m_bDecodeData = FALSE;
        }

        virtual ~CScannerDev(){}

    //  Methods
    public:
    
    // Properties
    public:        
        _declspec(property(get = GetDecodeData, put = SetDecodeData)) BOOL EnableDecodeData;
        BOOL GetDecodeData() {return m_bDecodeData;}
        void SetDecodeData(BOOL bEnable){m_bDecodeData = bEnable;}
        
        _declspec(property(get = GetScanDataLabel, put = SetScanDataLabel)) CComBSTR ScanDataLabel;
        CComBSTR GetScanDataLabel() {return m_bstrScanDataLabel;}
        void SetScanDataLabel(const CComBSTR& label){m_bstrScanDataLabel = label;}

        _declspec(property(get = GetScanData, put = SetScanData)) CComBSTR ScanData;
        CComBSTR GetScanData()
        {
            /*CComBSTR bstr;
            if (!m_dataBuf.empty())
            {
            bstr = m_dataBuf.front();
            m_dataBuf.pop();
            }

            return bstr;*/
            return m_bstrScanData;
        }
        void SetScanData(const CComBSTR &data) { m_bstrScanData = data;}
        
            
    
    protected:
        queue<CComBSTR> m_dataBuf;

        BOOL m_bDecodeData;
        
        CComBSTR m_bstrScanData;
        CComBSTR m_bstrScanDataLabel;
        LONG m_lScanDataType;
    };
}

